(()=>{

    let passcode = "secret passcode";

    class Employee {
        private _fullName!: string;
    
        get fullName(): string {
            return this._fullName;
        }
    
        set fullName(newName: string) {
            if (passcode && passcode == "secret passcode") {
                this._fullName = newName;
            }
            else {
                console.log("Error: Unauthorized update of employee!");
            }
        }

        show(){
            console.log(this._fullName)
        }
    }

    let e = new Employee()
    e.fullName = '里古拉斯.赵四'
    e.show()
    console.log(e.fullName)

    
})()